import {wxRequest,initData} from '@/utils/wxRequest';
const USEAES = true;
  
  
/**
 * 初始化数据
 * @return {[type]}        [description]
 */
const getInitData = ()=>initData();


/** 获取首页banner，导航nav，运营banner*/
const getHomeBanner = (params) => wxRequest(6000,params);


/* 获取首页限时抢购*/
const getHomeFlashTabList = (params) => wxRequest(6001,params);


/* 获取首页新品好物运营banner*/
const getHomeNewBanner = (params) => wxRequest(6002,params);


/* 获取首页小编推荐*/
const getHomeRecommendGoods = (params) => wxRequest(6003,params);


/* 获取分类*/
const getCategoryList = (params) => wxRequest(6005,params);


/* 获取个人订单*/
const getMineOrderList = (params) => wxRequest(3001,params,USEAES);


/* 验证用户是否绑定*/
const testLoginUserBound = (params) => wxRequest(1010,params);


/* 绑定手机号码*/
const LoginUserBoundPhone = (params) => wxRequest(2007,params);


/* 发送手机验证码*/
const getLoginPhoneCode = (params) => wxRequest(1001,params);


/* 验证手机验证码*/
const testLoginPhoneCode = (params) => wxRequest(1002,params);


/* 验证码登陆*/
const setLogin = (params) => wxRequest(2005,params);


/* 获取未读消息数量*/
const getUnReadMsgNums = (params) => wxRequest(7000,params);


/* 获取个人信息*/
const getMineUserInfo = (params) => wxRequest(2009,params);


/* 获取收藏列表*/
const getCollectList = (params) => wxRequest(2011,params);


/* 领取优惠券*/
const getCoupon = (params) => wxRequest(2012,params);


/* 获取我的优惠券列表*/
const getCouponList = (params) => wxRequest(2013,params);


/* 获取优惠券图片*/
const getCouponImage = (params) => wxRequest(2014,params);


/* 是否领取优惠券*/
const testIsCoupon = (params) => wxRequest(2015,params);


/* 获取地区三级联动*/
const getAddressAll = (params) => wxRequest(4000,params);


/* 获取我的地址列表*/
const getMyAddressList = (params) => wxRequest(4001,params,USEAES);


/* 编辑地址*/
const editMyAddress = (params) => wxRequest(4002,params,USEAES);


/* 获取地址详情*/
const getMyAddressDetail = (params) => wxRequest(4003,params,USEAES);


/* 删除我的地址*/
const delMyAddress = (params) => wxRequest(4004,params);

/* 取消订单or确认收货*/
const cancelMyOrder = (params) => wxRequest(3006,params,USEAES);


/*获取支付参数*/
// const setOrderPay = (params) => wxRequest(3009,params,USEAES);
const setOrderPay = (params) => wxRequest(3012,params,USEAES);


/*获取我的消息列表*/
const getMessageList = (params) => wxRequest(7001,params);


/*获取我的消息列表*/
const setReadMessage = (params) => wxRequest(7002,params);


/*获取商品列表*/
const getGoodsList = (params) => wxRequest(6006,params);


/*搜索*/
const searchGoodsList = (params) => wxRequest(1008,params);


/*获取购物车列表*/
const getCartsList = (params) => wxRequest(5000,params);



/*添加or编辑购物车*/
const editCarts = (params) => wxRequest(5001,params,USEAES);


/*购物车商品结算*/
const cartsSettlement = (params) => wxRequest(5002,params,USEAES);


/*加入or取消收藏*/
const editCollect = (params) => wxRequest(6007,params);


/*删除购物车商品*/
const delCartsGoods = (params) => wxRequest(5004,params);


/*获取订单结算信息*/
const getConfirmOrderInfo = (params) => wxRequest(3008,params,USEAES);


/*验证限时购商品有效性*/
const testFlashSaleStock = (params) => wxRequest(3005,params,USEAES);


/*清空购物车*/
const clearCarts = (params) => wxRequest(5003,params);


/*提交订单*/
const submitByOrder = (params) => wxRequest(3000,params,USEAES);


/*获取订单详情*/
const getOrderDetail = (params) => wxRequest(3002,params,USEAES);


/*获取物流信息*/
const getOrderTracking = (params) => wxRequest(3007,params,USEAES);


/*获取评价页面信息*/
const getOrderEvaluateInfo = (params) => wxRequest(3003,params,USEAES);


/*提交商品评价*/
const submitOrderEvaluate = (params) => wxRequest(3004,params,USEAES);


/*获取商品详情*/
const getGoodsDetail = (params) => wxRequest(6004,params);


/*获取商品评论列表*/
const getGoodsCommentList = (params) => wxRequest(6008,params);



/*虚拟商品购买*/
const submitByVirtualOrder = (params) => wxRequest(3010,params,USEAES);


/*提取卡密*/
const extractCardPw = (params) => wxRequest(3011,params,USEAES);


/*获取订单优惠券列表*/
const getOrderCouponList = (params) => wxRequest(3016,params,USEAES);








export default {
    getInitData,
    getHomeBanner,
    getHomeFlashTabList,
    getHomeNewBanner,
    getHomeRecommendGoods,
    getCategoryList,
    getMineOrderList,
    getLoginPhoneCode,
    testLoginPhoneCode,
    setLogin,
    testLoginUserBound,
    LoginUserBoundPhone,
    getUnReadMsgNums,
    getCollectList,
    getCouponList,
    getMyAddressList,
    getAddressAll,
    editMyAddress,
    getMyAddressDetail,
    delMyAddress,
    cancelMyOrder,
    setOrderPay,
    getMineUserInfo,
    getMessageList,
    setReadMessage,
    getGoodsList,
    searchGoodsList,
    getCartsList,
    editCarts,
    editCollect,
    delCartsGoods,
    cartsSettlement,
    getConfirmOrderInfo,
    testFlashSaleStock,
    clearCarts,
    submitByOrder,
    getOrderDetail,
    getOrderTracking,
    getOrderEvaluateInfo,
    submitOrderEvaluate,
    getGoodsDetail,
    getGoodsCommentList,
    getCouponImage,
    testIsCoupon,
    getCoupon,
    submitByVirtualOrder,
    extractCardPw,
    getOrderCouponList,
}
  